import request from '@/utils/request';
import { AxiosPromise } from 'axios';



//查询运营商资金账户列表
export const operatorAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/operatorAccount/list',
    method: 'get',
    params: query
  });
};


//获取资金账户详情
export const operatorAccountDetail = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/operatorAccount/'+id,
    method: 'get'
  });
};


//获取运营商的结算账户信息
export const operatorBank = (): AxiosPromise<[]> => {
  return request({
    url: '/payment/operator/getBank',
    method: 'get'
  });
};



//获取服务商开票信息
export const getSydInvInfo = (query:any): AxiosPromise<[]> => {
  return request({
    url: '/payment/syd/getInvInfo',
    method: 'get',
    params:query
  });
};


//查询代理商资金账户列表
export const channelAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/channelAccount/list',
    method: 'get',
    params: query
  });
};


//获取资金账户详情/payment/channelAccount/{id}
export const channelAccountDetail = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/channelAccount/'+id,
    method: 'get'
  });
};


//添加代理商提现记录
export const addChannelCashout = (data: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/channelCashout',
    method: 'post',
    data: data
  });
};


//添加运营商提现记录
export const addOperatorCashout = (data: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/operatorCashout',
    method: 'post',
    data: data
  });
};


//查询服务商资金账户列表
export const sydAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '//payment/sydAccount/list',
    method: 'get',
    params: query
  });
};


//获取资金账户详情//payment/sydAccount/{id}
export const sydAccountDetail = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/sydAccount/'+id,
    method: 'get'
  });
};


